package com.hgsoft.pubsv.component.base;

import java.util.regex.Pattern;

/**
 * 正则表达式统一在此定义
 *
 * @author saint
 */
public interface RegexpContants {

    static final String TEL = "1[3|4|5|6|7|8|9][0-9]\\d{8}";
    
    static final Pattern TEL_PATTERN = Pattern.compile("^1[3|4|5|6|7|8|9][0-9]\\d{8}$");

    static final String EMAIL = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
    
    static final String VEHICLE = "(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{0,1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$)|(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{6}$)|(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{1}[A-Z0-9]{1}[A-HJ-NP-Z0-9]{4}[领]{1}$)|(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}应急$)";

    /**
     * 发动机号
     */
    static final String engineRegex = "^[A-Z0-9-]*$";
    
    /**
     * 车辆识别代号
     */
    static final String vinRegex = "^[A-Z0-9]*$";
    
    /**
     * 地址
     */
    static final String addressRegex = "^[\\u4e00-\\u9fa5\\w\\.\\+()（）\\-·]*$";
    
    /**
     * xss过滤表达式
     */
    static final String xxsRegex = "script|eval|<script>(.*?)</script>|<script(.*?)>|</script>|javascript:|<iframe>(.*?)</iframe>|<iframe(.*?)>|</iframe>|onload(.*?)=|oninput(.*?)=|onerror(.*?)=|onclick(.*?)=|confirm(.*?)|onerror(.*?)=|onfocus(.*?)=|alert(.*?)|eval(.*?)";

}
